package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.Objects;

@Data
@Entity
@Table(name = "t_reg_rpt_nafmii_other")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@ExcelIgnoreUnannotated
@IdClass(RegRptNAFMIIOther.PK.class)
public class RegRptNAFMIIOther {
    public static class PK implements Serializable {
        private BigInteger mainId;
        private BigInteger id;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public BigInteger getId() {
            return id;
        }

        public void setId(BigInteger id) {
            this.id = id;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(id, pk.id);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, id);
        }
    }

    @Id
    @Column(name = "id")
    private BigInteger id;

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @ExcelProperty(index = 1)
    @Column(name = "fd_date")
    private Date date;

    @ExcelProperty(index = 2)
    @Column(name = "fc_organization_name")
    private String organizationName;

    @ExcelProperty(index = 3)
    @Column(name = "fc_organization_product")
    private String organizationProduct;

    @ExcelProperty(index = 4)
    @Column(name = "fc_counterparty_name")
    private String counterpartyName;

    @ExcelProperty(index = 5)
    @Column(name = "fc_counterparty_product")
    private String counterpartyProduct;

    @ExcelProperty(index = 6)
    @Column(name = "fc_type")
    private String type;

    @ExcelProperty(index = 7)
    @Column(name = "fc_counterparty_type")
    private String counterpartyType;

    @ExcelProperty(index = 8)
    @Column(name = "fc_counterparty_is_pro")
    private String isPro;

    @ExcelProperty(index = 9)
    @Column(name = "ff_principal")
    private Double principal;

    @ExcelProperty(index = 10)
    @Column(name = "fc_target_type")
    private String targetType;

    @ExcelProperty(index = 11)
    @Column(name = "fc_target_name")
    private String targetName;

    @ExcelProperty(index = 12)
    @Column(name = "fd_start_date")
    private Date startDate;

    @ExcelProperty(index = 13)
    @Column(name = "fd_end_date")
    private Date endDate;


    public BigInteger getId() {
        return id;
    }

    public void setId(BigInteger id) {
        this.id = id;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public BigInteger getMainId() {
        return mainId;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getOrganizationName() {
        return organizationName;
    }

    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }

    public void setOrganizationProduct(String organizationProduct) {
        this.organizationProduct = organizationProduct;
    }

    public String getOrganizationProduct() {
        return organizationProduct;
    }

    public void setCounterpartyName(String counterpartyName) {
        this.counterpartyName = counterpartyName;
    }

    public String getCounterpartyName() {
        return counterpartyName;
    }

    public void setCounterpartyProduct(String counterpartyProduct) {
        this.counterpartyProduct = counterpartyProduct;
    }

    public String getCounterpartyProduct() {
        return counterpartyProduct;
    }

    public void setCounterpartyType(String counterpartyType) {
        this.counterpartyType = counterpartyType;
    }

    public String getCounterpartyType() {
        return counterpartyType;
    }

    public void setIsPro(String isPro) {
        this.isPro = isPro;
    }

    public String getIsPro() {
        return isPro;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setPrincipal(Double principal) {
        this.principal = principal;
    }

    public Double getPrincipal() {
        return principal;
    }

    public String getTargetType() {
        return targetType;
    }

    public void setTargetType(String targetType) {
        this.targetType = targetType;
    }

    public String getTargetName() {
        return targetName;
    }

    public void setTargetName(String targetName) {
        this.targetName = targetName;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
}
